<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>招聘信息列表</title>
    <jsp:include page="../../import.jsp" flush="true"/>
    <!-- 是否显示设置敞口按钮 -->
    <sys:funcAuth resCd="LinkCrAmt">
        <span id="isShowLinkCrAmtBtn"/>
    </sys:funcAuth>
</head>
<body class="iframeBody">
<div class="Wrapper">
    <div id="pageInTab" class="pageInTab">
        <div tabid="tabA" title="线索列表" lselected="true">
            <div class="searchArea">
                <form id="searchBar">
                    <div class="fieldset1 clearFix">
                        <div class="fieldBox">
                            <div class="label">姓名</div>
                            <div class="field">
                                <input name="eplyNm" id="eplyNm" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                        <div class="fieldBox" >
                            <div class="label">应聘职位</div>
                            <div class="field">
                                <input name="eplyPstn" id="eplyPstn" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                        <div class="fieldBox" >
                            <div class="label">电话</div>
                            <div class="field">
                                <input name="eplyPhe" id="eplyPhe" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                        <div class="fieldBox" >
                            <div class="label">城市</div>
                            <div class="field">
                                <input name="city" id="city" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                         <div class="fieldBox"  isyw="0">
                            <div class="label">开始时间</div>
                            <div class="field">
                                <input name="beginTime" id="beginTime" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                        <div class="fieldBox"  isyw="0">
                            <div class="label">结束时间</div>
                            <div class="field">
                                <input name="endTime" id="endTime" type="text" class="ui-textbox" value="">
                            </div>
                        </div>
                        <div class="clearFix"></div>
                        <div class="btnsBox">
                            <span id="searchBtn" class="sq-button sq-button-round">查询</span>
                            <span id="clearBtn" onclick="clearBtn();" class="sq-button sq-button-round">清空</span>
                        </div>

                    </div>
                </form>
            </div>

            <div id="ligergrid1" class="sq-grid"></div>
        </div>
    </div>
</div>


<div id="chooseFlowDIV" style="display:none">
    <div id="ligergrid_flowStart" class="sq-grid"></div>
</div>
<div id="ywchange_result" style="display:none">
    <form id="ywchange_result_form">
    </form>
</div>
<script src="../js/ligerDateEditor.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#endTime").ligerDateEditor();
        $("#beginTime").ligerDateEditor();
    })

    var isShowLinkCrAmtBtn = $("#isShowLinkCrAmtBtn");
    var isLnkCompFlag = '${isLnkCompFlag}';
    if (isShowLinkCrAmtBtn.length && isLnkCompFlag && isLnkCompFlag == 1) {
        $("#compCrLim").show();
        $("#compCrLimText").show();
    }

    var grid = null;
    var pageInApp = {}; // to 下一级子窗口 接口
    var pageInTab = null;
    $(function () {
        initTab();

        $("#ligergrid1").ligerGrid({
            url: '<%=path%>/carloan/odrclueinfo/initEplyInfoList.do',
            method: 'get',
            columns: [
                {display: 'ID', name: 'id', align: 'center', minWidth: 140, enabledSort: true},
                {display: '姓名', name: 'eplyNm', minWidth: 140, align: 'center', enabledSort: true},
                {display: '电话', name: 'eplyPhe', minWidth: 180, align: 'center', enabledSort: true},
                {display: '城市', name: 'city', minWidth: 180, align: 'center', enabledSort: true},
                {display: '申请职位', name: 'eplyPstn', minWidth: 180, align: 'center', enabledSort: true},
                {display: '申请时间', name: 'crtTm', minWidth: 100, enabledSort: true,render:renderDate},
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -20,
            checkbox: true,
            delayLoad: true,
            rownumbers: true
        });
        //   initOrgTree();
        grid = liger.get("ligergrid1");
        grid.setHeight(100);
        $("#searchBar").ligerForm();
        $("#searchBtn").click(function (event) {
            var form = new liger.get("searchBar");
            var data = form.getData();
            for (name in data) {
                grid.setParm(name, data[name]);
            };
            grid.reload();
        });
        var form = new liger.get("searchBar");
        var data = form.getData();
        for (name in data) {
            grid.setParm(name, data[name]);
        }
        ;
        grid.reload();
    });

    var loadedTabs = [];

    //初始化Tab页签
    function initTab() {
        pageInTab = $("#pageInTab").ligerTab({
            height: 'auto',
            contextmenu: false,
            minIframeHeight: GET_minIframeHeight(),
            onAfterSelectTabItem: function (tabid) {
                var selectedRows = grid.getSelectedRows();
            }
        });
        $.extend(true, pageInApp, {
            pageInTab: pageInTab
        });
    };

    //获取操作列
    /*function getOptColumn() {
        var column = {
            display: '操作',
            isSort: false,
            width: 150,
            align: 'center',
            /!*render: function (rowdata, rowindex, value) {
                var h = "";
                h += '<a class="sq-button-hasicon" href="javascript:detailBtn(';
                h += "'" + rowdata.clueId + "'";
                h += ')"><i class="sqBtnIco_2"></i>详情</a>';
                //yaoxr
                var f = "";
                f += '<a class="sq-button-hasicon" href="javascript:detailUpdateBtn(';
                f += "'" + rowdata.clueId + "'";
                f += ')"><i class="sqBtnIco_2"></i>编辑</a>';
                return h + f;
            }*!/
        }
        return column;
    }*/

    //格式化时间
    function renderDate(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }

    function detailBtn(id) {
        var fromPrjFlag = true;
        var detailFlag = true;

        var _flag = $("#fromPrjFlagId").val();//来自哪里
        if (StringUtils.isNotEmpty(_flag)) {
            if (_flag == 'false') {
                fromPrjFlag = false;
            }
        }

        Add_navTab('tab_odrclueinfo_detail' + id, '线索详情', '<%=path%>/carloan/odrclueinfo/toDetailPage.do?fromPrjFlag=' + fromPrjFlag + '&&id=' + id + '&&detailFlag=' + detailFlag);
    }

    function detailUpdateBtn(id) {
        var fromPrjFlag = true;
        var detailFlag = true;

        var _flag = $("#fromPrjFlagId").val();//来自哪里
        if (StringUtils.isNotEmpty(_flag)) {
            if (_flag == 'false') {
                fromPrjFlag = false;
            }
        }

        Add_navTab('tab_odrclueinfoUpdate_detail' + id, '线索编辑', '<%=path%>/carloan/odrclueinfo/toUpdateDetailPage.do?fromPrjFlag=' + fromPrjFlag + '&&id=' + id + '&&detailFlag=' + detailFlag);
    }

    function clearBtn() {
        $("#searchBar").ligerForm();
        var form = new liger.get("searchBar");
        form.setData({
            eplyNm: " ",
            city: " ",
            eplyphe: " ",
            beginTime: " ",
            endTime: " ",
            eplyPstn:" "
        });
    }
</script>

</body>
</html>